<?php
/*
	[TOA] (C) 2008-2010 TOA TEAM.
	$QQ : 536605913 
	$Email : baiweijiang@sina.com
	$Url : http://www.515158.com
*/
define('IN_ADMIN',True);
require_once('common.php');
if ($_GET[AjaxAction]== 'sms' ) {
    global $db;
	$num = $db->result("SELECT COUNT(*) AS num FROM ".DB_TABLEPRE."receive WHERE 1 and type!='2' and `key`='0' and receiveperson='".GET_INC_USER_NAME($_USER->id)."'");
    if($num!='0'){
    	echo "(".$num.")";
    }
	else{
		echo "(0)";
    }
}elseif ($_GET[AjaxAction]== 'workdate' ) {
  $num = $db->result("SELECT COUNT(*) AS num FROM ".DB_TABLEPRE."workdate where uid = '".$_USER->id."' and enddate>'".get_date('Y-m-d H:i:s',PHP_TIME)."'");
  if($num!='0'){
 	 echo "(".$num.")";
  }else{
  	echo "(0)";
  }
} 

?>